import { useContext } from "react"
import MyContext from "../MyContext"

function ContextCom() {
    const cv = useContext(MyContext)
    return (
            <MyContext.Consumer>
                {value => <div>context data: {value}-{cv}</div>}
            </MyContext.Consumer>
    )
}

export default ContextCom